// /**
//  * api接口统一管理
//  */
import { get, post } from './http'

//=============================================================>网课模块

//登录(手机验证码登录)
export const phone_login = p =>post('/user/phone_login',p)
//登录(账号秘密登录)
export const user_login = p =>post('/user/login',p)

//获取机构信息
export const getOrg2 = () => get('action/get_org');

//获取机构信息根据org_code
export const getOrg = p => get('action/get_org?org_code='+p);

//首次报名
export const firstsign = p => post('action/first_sign_test',p);

//n次报名
export const get_n_Org = p =>post('action/n_sign_test',p)
//发送验证码
export const send_sms = p =>post('/user/send_sms',p)
//上传证件照
export const upload = p =>post('/action/test_img',p)//{photo:base64图片}
//报考补考
export const exam_reg = p =>post('/action/exam_reg_test',p)

//获取全部报考记录
export const exam_record = () =>get('/action/exam_record')

//根据科目ID获取报考记录
export const exam_recordByCourse = p =>get('/action/exam_record?course_id='+p)

//获取档案
export const getProfile = () =>get('/action/profile')

//获取学员档案
export const studentList = p =>post('/action/search',p)

//获取科目
export const courselist = () =>get('/action/course_list')

//获取机构列表(管理员)
export const org_list = () =>get('action/org_list')

//审核
export const check = p =>post('/action/check',p)

//根据科目机构获取档案
export const getProfileBy = p =>get(`/action/profile?org=${p.org_code}&course_id=${p.course_id}`)

//编辑资料
export const editContent = p =>post('/action/edit_test',p) //pid 档案id 必填

//导出数据
export const downCsv = p =>post('/action/down_csv',p)

//获取考试时间
export const examDate = () =>get('/action/exam_date');
//获取考试时间
export const examDateByCourseId = p =>get('/action/exam_date?course='+p);

//报考记录
export const scoreList = () =>get('/action/score_list');

//实名认证
export const getPersonVerifyUrl = p =>post('/action/get_person_verify_url',p)

//获取实名认证信息
export const getPersonUserInfo = p =>post('/action/get_person_cert_info',p)

//合同填充
export const generateContract = p =>post('/action/generate_contract',p);

//查看合同
export const viewContract = p =>post('/action/view_contract',p);

//导入CSV文件
export const updateUserPool = p =>post('/action/update_user_pool',p);

//实名认证2
export const createUser = p =>post('/action/create_user_test',p)

//合同签署提交合同号
export const signContract = p =>post('/action/sign_contract',p)

//获取公告集合
export const noticeList = () =>get('/action/user_notice_list')

//添加备注信息
export const addDetail = p =>post('/action/edit_detail',p)

//审核日志
export const stateLog = p =>post('/action/state_log',p)

//修改密码
export const forgetPass = p => post('/user/forget_pass',p)

//是否复审
export const preview = pid => get('/action/preview?pid='+pid)

export const getImg = (url) =>get(url);


